#pragma once
#include "TextureAtlasInfo.hpp"

namespace he
{
	class TerrainTileSplat;

	//! Terrain tile set.
	class TerrainTileSet : boost::noncopyable
	{
		// Typedefs
	private:
		//! Vector of texture atlas variants;
		typedef std::vector<TextureAtlasInfo_t> TerrainAtlasVariantVector_t;
		typedef std::map<unsigned short, TerrainAtlasVariantVector_t> TerrainTypeMap_t;

		// Attributes
	private:
		//! Splat used.
		TerrainTileSplat const &m_SplatUsed;
		//! Material name used.
		std::string const m_MaterialName;
		//! Map of terrain type id and terrain type.
		TerrainTypeMap_t m_TerrainTypeMap;

		// Operations
	public:
		//! Add terrain type.
		void add_type(unsigned short Type, TextureAtlasInfo_t const &Variant);
		//! Get tile type.
		TextureAtlasInfo_t const &get_tile_type(unsigned short Type, std::uint_least8_t Variant) const;
		//! Get splat.
		TerrainTileSplat const &get_splat() const;
		//! Get material name.
		std::string const &get_material_name() const;

		// Construction/Destruciton
	public:
		TerrainTileSet(TerrainTileSplat const &Splat, std::string const &MaterialName);
	};
} /*he*/
